package com.qttaudio.example.utils;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CircleCrop;
import com.bumptech.glide.request.RequestOptions;
import com.qttaudio.ios.demo.R;

/**
 * Created by Administrator on 2019/7/17 0017.
 */

public class GlideUtil {

    public static void loadMicHeadUrl(Context context, ImageView imageView, String url) {
        Glide.with(context).load(url)
                .apply(RequestOptions.bitmapTransform(new CircleCrop()))
                .placeholder(R.mipmap.room_demo_head)
                .error(R.mipmap.room_demo_head)
                .into(imageView);
    }

    public static void loadCircleImageUrl(Context context, ImageView imageView, String url) {
        Glide.with(context).load(url).apply(RequestOptions.bitmapTransform(new CircleCrop())).into(imageView);
    }
}
